package atguigu.thread.task;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;  
  
public class ThreadPerTaskExecutor {  
    private ExecutorService executor;  
  
    public ThreadPerTaskExecutor(int threadCount) {  
        executor = Executors.newFixedThreadPool(threadCount);  
    }  
  
    public void execute(Runnable task) {  
        executor.execute(task);  
    }  
  
    public void shutdown() {  
        executor.shutdown();  
    }  
}